from rest_framework.routers import DefaultRouter
from .views import RolesViewset,UserViewset,MenuViewset,RolesUserViewset,PermissionViewset
# 2. 实例化DefaultRouter
router = DefaultRouter()
# 3. 注册应用url
router.register('roles',RolesViewset,basename='roles')
router.register('users',UserViewset,basename='users')
router.register('menus',MenuViewset,basename='menus')
router.register('roles-users',RolesUserViewset,basename='rolesusers')
router.register('permissions',PermissionViewset,basename='permissions')

urlpatterns = [

]
#4.附加
urlpatterns += router.urls